package com.lemon.smartsafety.app;

import com.lemon.smartsafety.BuildConfig;

/**
 * Created by Cooliean on 16/1/17.
 * 软件设置相关
 */
public class Constants {

    /**
     * @Time 2017/10/16
     * @desc 不同客户版本后缀
     *
     * 常熟定制项目 -- cs
     * 徐州定制项目 -- xz
     * 江溪街道定制项目 -- jxjd
     */
    public static final String VERSION_SUFFIX = BuildConfig.VERSION_SUFFIX;

    /**
     * 测试帐号 BuildConfig.DEBUG = true  才会起作用
     */
    public static final String TEST_USER_NAME = "test0";
    public static final String TEST_USER_PWD  = "111111";

    public static final int READ_TIME_OUT = 30000;

    //压缩图片的宽高设置
//    public static final int IMAGE_VIEW_WIDTH  = 600;
//    public static final int IMAGE_VIEW_HEIGHT = 800;

    //压缩图片的宽高设置 Andrew.yin 为了保证图片的清晰度
    public static final int IMAGE_VIEW_WIDTH  = 1200;
    public static final int IMAGE_VIEW_HEIGHT = 1600;


    /**
     * DEBUG TAG
     */
    public static final String APP_TAG              = "SAFE_CLOUD";
    /**
     * HUD关闭延迟
     */
    public static final int    DEFAULT_HUD_DURATION = 2000;

    /**
     * 动画时间
     */
    public static final int RECYCLE_VIEW_ANIMATOR_DURATION              = 300;
    public static final int RECYCLE_VIEW_AUTO_REFRESH_ANIMATOR_DURATION = 500;

    /**
     * 默认分页大小
     */
    public final static int PAGE_SIZE                 = 20;
    public final static int DEFAULT_FIRST_PAGE_NUMBER = 1;

    /**
     * 历史纪录最大20条
     */
    public final static int HISTORY_MAX_NUMBER = 20;

    /**
     * 服务器地址相关
     */

    public static final String SERVER_V2  = "SERVER_V2";                //服务器2代---代码 【acloud_new】 project
    public static final String MONITOR_V1  = "MONITOR_V1";              // 动态监测服务端v1
    public static final String GSAFE  = "GSAFE";                        // 感知安全系统服务
    public static final String VIDEO_SERVER  = "VIDEO_SERVER";          // 动态监测视频服务


    public static final String DEFAULT_KEY_CL_HTTP_BASE_URL  = BuildConfig.DEFAULT_KEY_CL_HTTP_BASE_URL;  // 服务器ip
    public static final String DEFAULT_KEY_CL_HTTP_PORT      = BuildConfig.DEFAULT_KEY_CL_HTTP_PORT;      // 服务器port


    public static final String DEFAULT_KEY_CL_HTTP_VIRTUAL_DIRECTORY  = "acloud";
    public static final String DEFAULT_KEY_CL_HTTP_VIRTUAL_DIRECTORY_NEW  = "acloud_new";           //add by Andrew.yin 2017/8/15
    public static final String DEFAULT_KEY_CL_HTTP_VIRTUAL_DIRECTORY_MONITOR  = "gsms";             //add by Andrew.yin 2017/8/15
    public static final String DEFAULT_KEY_CL_HTTP_VIRTUAL_DIRECTORY_GSAFE  = "gsafe";              //add by Andrew.yin 2017/8/15


    public static final String DEFAULT_KEY_CL_FILES_BASE_URL          = DEFAULT_KEY_CL_HTTP_BASE_URL;
    public static final String DEFAULT_KEY_CL_FILES_VIRTUAL_DIRECTORY = "_guava_files";             //changed by Andrew.yin 2017/8/15
    public static final String DEFAULT_KEY_CL_FILES_PORT              = DEFAULT_KEY_CL_HTTP_PORT;


    /**
     * 测试服务器地址
     */

    public static String TEST_KEY_CL_HTTP_BASE_URL           = "10.0.1.99";
    //    public static       String TEST_KEY_CL_HTTP_BASE_URL           = "202.115.18.10";
    public static String TEST_KEY_CL_HTTP_VIRTUAL_DIRECTORY  = "wsafe";
    public static String TEST_KEY_CL_HTTP_PORT               = "80";
    public static String TEST_KEY_CL_FILES_BASE_URL          = TEST_KEY_CL_HTTP_BASE_URL;
    public static String TEST_KEY_CL_FILES_VIRTUAL_DIRECTORY = "files";
    public static String TEST_KEY_CL_FILES_PORT              = TEST_KEY_CL_HTTP_PORT;


    public final static String DEFAULT_UPLOAD_FOLDER = "nfk_fire/emergency";
    public final static String FILE_UPLOAD_FOLDER    = "nfk_fire";


    public final static String FILE_IPEXP = "@@IPEXP_IMP_FILES_WEB/nfk_fire/emergency/";
    public final static String IPEXP      = "@@IPEXP_IMP_FILES_WEB/";


    /**
     * 请求的key
     */
    public final static String RP_PASSWORD = "jszy@2010";

    //键值 网络访问和文件服务器
    //    public static final String KEY_CL_HTTP_HOST               = "KEY_CL_HTTP_HOST";
    public static final String KEY_CL_HTTP_BASE_URL           = "KEY_CL_HTTP_BASE_URL";
    public static final String KEY_CL_HTTP_VIRTUAL_DIRECTORY  = "KEY_CL_HTTP_VIRTUAL_DIRECTORY";
    public static final String KEY_CL_HTTP_PORT               = "KEY_CL_HTTP_PORT";
    public static final String KEY_CL_FILES_BASE_URL          = "KEY_CL_FILES_BASE_URL";
    public static final String KEY_CL_FILES_VIRTUAL_DIRECTORY = "KEY_CL_FILES_VIRTUAL_DIRECTORY";
    public static final String KEY_CL_FILES_PORT              = "KEY_CL_FILES_PORT";
    //    public static final String KEY_CL_UPLOAD_FOLDER_NAME      = "KEY_CL_UPLOAD_FOLDER_NAME";
    public static final String KEY_FIRE_SUPERVISON_HOST               = "KEY_FIRE_SUPERVISON_HOST";
    /**
     * 主要是用在请求的时候作为认证使用*
     */
    public static final String ENCRYPT_LOGININFO_DEVICEID     = "encrypt_logininfo_deviceid";
    public static final String USER_ID                        = "user_id";
    public static final String USER_NAME                      = "user_name";
    public static final String USER_PHOTO_URL                 = "user_photo_url";
    public static final String DEVICES_ID                     = "devices_id";
    public static final String IS_LOGIN_FLAG                  = "is_login";
    public static final String USER_TYPE                      = "user_type";
    public static final String USER_TYPE_NAME                 = "user_type_name";
    public static final String USER_PLACE_INFO                = "user_place_info";
    public static final String USER_PLACE_ID                  = "user_place_id";
    public static final String PHONE_TOKEN                    = "phone_token";
    public static final String EMAIL                          = "email";
    public static final String BIND_LOGIN_NAME                = "bing_login_name";
    public static final String EMAIL_VERIFY                   = "email_verify";
    public static final String IS_CLOSE_FIRE_LIST_VIEW        = "is_close_fire_list_view";
    public static final String USER_PHOTO_FID                 = "user_photo_fid";

    public final static String APP_NAME               = "lemon_safe_cloud";
    public final static String APP_DOWNLOAD_FILE_NAME = "smart_safe_platform.apk";
    public final static String APP_CANON_PRINTER_FILE_NAME = "canon_printer.apk";

    //视频最大录制时间60秒
    public final static int MAX_RECORD_SECOND         = 60;
    //这里是灯的闪烁时间间隔
    public final static int STATUS_IMAGE_RED_DELAY    = 500;
    public final static int STATUS_IMAGE_YELLOW_DELAY = 1000;


    /**
     * 用户相关 SharePreference
     * ************************************************************************************
     */
    public static final String LOGINNAME              = "login_name";
    public static final String LOGIN_PASSWORD         = "temp_string";

    /**
     * 加密后的密码
     */
    public static final String ENCRYPT_LOGIN_PASSWORD = "encrypt_login_password";
    public static final String ENCRYPT_LOGIN_INFO     = "encrypt_login_info";
    /**
     * SharePreferences文件名.
     */
    public static final String SHAREPATH              = "app_share";
    public static final String SHAREPATH1             = "server_url";


    //app临时目录
    public static final String APP_TEMP_DIR           = "/safe_cloud_cs";    //文件目录
    /**
     * Banner的切换时间间隔
     */
    public static final int    BANNER_TURNING_DELAY   = 5000;
    /**
     * Banner的最大显示数字
     */
    public static final int    MAX_BANNER_IMAGE_COUNT = 6;


    /**
     * 主菜单每行图标的个数
     */
    public static final int MAIN_PANEL_ICON_COUNT  = 3;
    /**
     * 主菜新闻类型每行个数
     */
    public static final int MAIN_PANEL_NEWS_COLUMN = 2;


    /**
     * HUD提示窗口是否使用软件主题颜色
     */
    public static final boolean IS_HUD_USER_PRIMARY = false;


    /**
     * 请求结果
     */
    public enum Result {
        SUCCESS, ERROR;
    }


    /**
     * 企业绑定状态
     * ************************************************************************************
     */
    /**
     * 不可以，显示提示信息：您所在的城市或者角色不能使用此应用；
     */
    public static final String CANT_USE  = "-1";
    /**
     * 绑定已审核，直接进入应用。
     */
    public static final String CAN_USE   = "0";
    /**
     * 绑定未审核（显示绑定的企业名称，提示等待审核，流程结束）。
     */
    public static final String NO_SHENHE = "1";
    /**
     * 未绑定，返回与其他应用的绑定数据，以及是否可以新建企业的标志。如果返回的其他绑定的数据为空，则不管新建标志，均可显示新建；
     * 如返回的其他绑定有数据，则显示已经绑定的数据，供选择，判断是否新建的标志，确定是否显示新建按钮；
     */
    public static final String NO_BIND   = "2";

    /**
     * 部分没有审核也可以使用的应用
     */
    public static final String NO_SHENHE_CANUSE = "3";
    /**
     * 不可以新建
     */
    public static final String CANT_NEW         = "0";
    /**
     * 可以新建
     */
    public static final String CAN_NEW          = "1";


    //    FragmentDialog
    public static final String DIALOG_TAG_CHECK_DATE  = "dialog_tag_check_date";
    public static final String DIALOG_TAG_REFORM_DATE = "dialog_tag_reform_date";


    //add by Andrew.yin 2017/8/29 begin
    public static final String REGISTER_PROTOCOL_URL = "https://www.jingan-china.cn/agreement/registInfo.html";
    public static final String SCORE_HELP_URL = "https://www.jingan-china.cn/agreement/scoreInfo.html";

    //add by Andrew.yin 2017/8/29 end


}
